package yns.springcloud.oakwood.guide.consumer;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import yns.springcloud.oakwood.guide.bean.Order;
import yns.springcloud.oakwood.guide.bean.User;
import yns.springcloud.oakwood.guide.circuitbreaker.FeignCircuitbreaker;

@FeignClient(name = "${producer.name}", fallback = FeignCircuitbreaker.class)
public interface FeignConsumer {
	@GetMapping("/producer")
	public String consumerProducer(@RequestParam("value") String value);

	@PostMapping("/producer2")
	public Order consumerProducer2(@RequestBody User user);
	
	@PutMapping("/producer3")
	public Order consumerProducer3(@RequestBody User user);
}
